<template>
  <view :style="themeColor">
    <view class="page">
      <view
        class="flex flex-direction flex-wrap align-stretch benben-position-layout flex personalinformationSuccessfully_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub personalinformationSuccessfully_fd0_0'>
          <view class='flex flex-wrap align-center personalinformationSuccessfully_fd0_0_c0' @tap.stop="handleJumpDiy"
            data-type="back" data-url="1">
            <text class='fu-iconfont2  personalinformationSuccessfully_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='personalinformationSuccessfully_fd0_0_c1_c0'>加入会员</text>
          </view>
          <view class='flex flex-wrap align-center justify-end personalinformationSuccessfully_fd0_0_c0'>
            <image class='personalinformationSuccessfully_fd0_0_c2_c0' mode="aspectFit" :src='STATIC_URL+"7.png"'>
            </image>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view
        class="flex flex-direction flex-wrap align-stretch benben-flex-layout personalinformationSuccessfully_flex_1">
        <view class='flex flex-direction flex-wrap align-center'>
          <image class='personalinformationSuccessfully_fd1_0_c0' mode="aspectFit" :src='STATIC_URL+"46.png"'></image>
          <text class='personalinformationSuccessfully_fd1_0_c1'>填写完成</text>
          <text class='personalinformationSuccessfully_fd1_0_c2'>恭喜您已填写完成相关信息
            立刻支付!让更多人看粮站信息</text>
        </view>
        <view class='flex flex-direction flex-wrap align-stretch personalinformationSuccessfully_fd1_1'>
          <view class='flex flex-wrap align-center'>
            <text class='personalinformationSuccessfully_fd1_1_c0_c0'>订单编号：</text>
            <text class='personalinformationSuccessfully_fd1_1_c0_c1'>{{dingdanhao}}</text>
          </view>
          <view class='flex flex-wrap align-center personalinformationSuccessfully_fd1_1_c1'>
            <text class='personalinformationSuccessfully_fd1_1_c0_c0'>订单名称：</text>
            <text class='personalinformationSuccessfully_fd1_1_c0_c1'>加入粮站</text>
          </view>
          <view class='flex flex-wrap align-center personalinformationSuccessfully_fd1_1_c1'>
            <text class='personalinformationSuccessfully_fd1_1_c0_c0'>订单金额：</text>
            <text class='personalinformationSuccessfully_fd1_1_c0_c1'>￥</text>
            <text class='personalinformationSuccessfully_fd1_1_c0_c1'>{{jiage}}</text>
          </view>
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <!---flex布局flex布局开始-->
      <view
        class="flex flex-direction flex-wrap align-stretch benben-flex-layout personalinformationSuccessfully_flex_2">
        <view class='flex flex-wrap align-center personalinformationSuccessfully_fd2_0'>
          <text class='personalinformationSuccessfully_fd2_0_c0'>支付方式</text>
        </view>
        <benben-select-diy ref="showSelectPopup1706516085270" class-name='flex flex-direction align-stretch flex'
          :items.sync="payType" v-model="pay_id" default-type="value" default-label="name" :allow-cancel='false'
          type="radio" :disabled='false'>
          <template v-for='(item,key0) in payType'>
            <view v-if="item.isSelected"
              class='flex align-center justify-between flex personalinformationSuccessfully_fd2_1_c0' :key="key0"
              @tap="$refs.showSelectPopup1706516085270.tapHandle(key0)">
              <view class='flex flex-wrap align-center'>
                <image class='personalinformationSuccessfully_fd2_1_c0_c0_c0' mode="aspectFit" :src='item.image'>
                </image>
                <text class='personalinformationSuccessfully_fd2_1_c0_c0_c1'>{{item.name}}</text>
              </view>
              <image class='personalinformationSuccessfully_fd2_1_c0_c1' mode="aspectFit" :src='STATIC_URL+"26.png"'>
              </image>
            </view>
            <view v-else class='flex align-center justify-between flex personalinformationSuccessfully_fd2_1_c0'
              :key="key0" @tap="$refs.showSelectPopup1706516085270.tapHandle(key0)">
              <view class='flex flex-wrap align-center'>
                <image class='personalinformationSuccessfully_fd2_1_c0_c0_c0' mode="aspectFit" :src='item.image'>
                </image>
                <text class='personalinformationSuccessfully_fd2_1_c0_c0_c1'>{{item.name}}</text>
              </view>
              <image class='personalinformationSuccessfully_fd2_1_c0_c1' mode="aspectFit" :src='STATIC_URL+"127.png"'>
              </image>
            </view>
          </template></benben-select-diy>
      </view>

      <!---flex布局flex布局结束-->
      <view
        class="flex flex-direction flex-wrap align-stretch benben-position-layout flex personalinformationSuccessfully_flex_3">
        <view class='flex flex-wrap align-center justify-between flex-sub personalinformationSuccessfully_fd3_0'>
          <view class='flex flex-wrap align-end'>
            <text class='personalinformationSuccessfully_fd3_0_c0_c0'>应付：</text>
            <text class='personalinformationSuccessfully_fd3_0_c0_c1'>￥</text>
            <text class=' personalinformationSuccessfully_fd3_0_c0_c2'>
              <text class=' personalinformationSuccessfully_price1_fd3_0_c0_c2'>{{ jiage | frontPrice }}</text>
              <text class=' personalinformationSuccessfully_price2_fd3_0_c0_c2'>{{ jiage | laterPrice }}</text>
            </text>
          </view>
          <button class='personalinformationSuccessfully_fd3_0_c1' @tap.stop="goPay" data-type="navigateTo"
            :data-url="`/pages/wode/paymentSuccessful/paymentSuccessful`">确认支付</button>
        </view>

      </view>
      <view :style="{height: '90rpx'}"></view>
    </view>
  </view>
</template>
<script>
  export default {
    components: {},


    data() {
      return {
        "payType": [{
          "name": "支付宝",
          "value": "1",
          "image": require('@/static/images/178.png')
        }],
        "pay_id": "1",
        aid: '',
        dingdanhao: '',
        jiage: ''
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      this.aid = options.aid
      this.getData()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      async goPay() {
        let data62e335233b477 = await this.$api.post(global.apiUrls.post645cc048d1f34, {
          order_sn: this.dingdanhao
        })
        if (data62e335233b477.data.code != 1) {
          this.$message.info(data62e335233b477.data.msg);
          return
        }
        console.log('data62e335233b477.data.data', data62e335233b477.data.data)
        await this.requestPaymentAli(data62e335233b477.data.data)
        uni.navigateBack()
      },
      getData() {
        this.$api.post(global.apiUrls.post65d44e2f3886d, {
          liangzhan_id: this.aid,
          leixing: '3'
        }).then(res => {
          if (res.data.code == 1) {
            this.dingdanhao = res.data.data.dingdanhao
            this.jiage = res.data.data.jiage
          }
        })
      },
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: rgba(246, 246, 246, 1);
    background-size: 100% auto;
  }

  .personalinformationSuccessfully_flex_0 {
    background: rgba(255, 255, 255, 1);
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto;
  }

  .personalinformationSuccessfully_fd0_0_c2_c0 {
    width: 119rpx;
    height: 55rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .personalinformationSuccessfully_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .personalinformationSuccessfully_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .personalinformationSuccessfully_fd0_0_c0 {
    width: 120rpx;
  }

  .personalinformationSuccessfully_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .personalinformationSuccessfully_flex_1 {
    background: rgba(255, 255, 255, 1);
    background-size: 100% auto;
  }

  .personalinformationSuccessfully_fd1_1_c1 {
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .personalinformationSuccessfully_fd1_1_c0_c1 {
    color: #101010;
    font-size: 32rpx;
    font-weight: 400;
    line-height: 46rpx;
  }

  .personalinformationSuccessfully_fd1_1_c0_c0 {
    color: #666666;
    font-size: 32rpx;
    font-weight: 400;
    line-height: 46rpx;
    margin: 0rpx 24rpx 0rpx 0rpx;
  }

  .personalinformationSuccessfully_fd1_1 {
    margin: 72rpx 0rpx 0rpx 0rpx;
    padding: 0rpx 32rpx 32rpx 32rpx;
  }

  .personalinformationSuccessfully_fd1_0_c2 {
    color: #666666;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 42rpx;
    text-align: center;
    margin: 30rpx 0rpx 0rpx 0rpx;
  }

  .personalinformationSuccessfully_fd1_0_c1 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 700;
    line-height: 32rpx;
    margin: 58rpx 0rpx 0rpx 0rpx;
  }

  .personalinformationSuccessfully_fd1_0_c0 {
    width: 250rpx;
    height: 180rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 58rpx 0rpx 0rpx 0rpx;
  }

  .personalinformationSuccessfully_flex_2 {
    border-top: 20px solid rgba(246, 246, 246, 1);
    background: rgba(255, 255, 255, 1);
    background-size: 100% auto;
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .personalinformationSuccessfully_fd2_1_c0_c1 {
    width: 36rpx;
    height: 36rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .personalinformationSuccessfully_fd2_1_c0_c0_c1 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 53rpx;
  }

  .personalinformationSuccessfully_fd2_1_c0_c0_c0 {
    width: 52rpx;
    height: 52rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 16rpx 0rpx 0rpx;
  }

  .personalinformationSuccessfully_fd2_1_c0 {
    margin: 0rpx 0rpx 24rpx 0rpx;
  }

  .personalinformationSuccessfully_fd2_0_c0 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 700;
    line-height: 42rpx;
  }

  .personalinformationSuccessfully_fd2_0 {
    margin: 32rpx 0rpx 32rpx 0rpx;
  }

  .personalinformationSuccessfully_flex_3 {
    background: rgba(255, 255, 255, 1);
    width: 750rpx;
    height: 90rpx;
    overflow: hidden;
    z-index: 10;
    bottom: calc(0rpx + var(--window-bottom));
    background-size: 100% auto;
  }

  .personalinformationSuccessfully_fd3_0_c1 {
    background: rgba(37, 104, 174, 1);
    border-radius: 0rpx;
    width: 280rpx;
    line-height: 90rpx;
    font-size: 32rpx;
    color: #fff;
  }

  .personalinformationSuccessfully_price2_fd3_0_c0_c2 {
    font-size: 28rpx;
  }

  .personalinformationSuccessfully_price1_fd3_0_c0_c2 {
    font-size: 56rpx;
  }

  .personalinformationSuccessfully_fd3_0_c0_c2 {
    color: #ff5536;
    font-weight: 600;
    line-height: 42rpx;
  }

  .personalinformationSuccessfully_fd3_0_c0_c1 {
    color: #EF3A3A;
    font-size: 22rpx;
    font-weight: 700;
    line-height: 42rpx;
  }

  .personalinformationSuccessfully_fd3_0_c0_c0 {
    color: #1A1A1A;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 44rpx;
  }

  .personalinformationSuccessfully_fd3_0 {
    padding: 0rpx 0rpx 0rpx 32rpx;
  }
</style>
